package com.esri.core.geometry;

import com.esri.core.geometry.Geometry;

/* JADX INFO: Access modifiers changed from: package-private */
/* loaded from: classes.dex */
public abstract class RasterizedGeometry2D {
    /* JADX INFO: Access modifiers changed from: package-private */
    public abstract double a();

    /* JADX INFO: Access modifiers changed from: package-private */
    public abstract int b();

    public abstract HitType queryEnvelopeInGeometry(Envelope2D envelope2D);

    public abstract HitType queryPointInGeometry(double d, double d2);

    /* loaded from: classes.dex */
    public enum HitType {
        OUTSIDE(0),
        INSIDE(1),
        BORDER(2);
        
        private int a;

        HitType(int i) {
            this.a = i;
        }
    }

    public static RasterizedGeometry2D create(Geometry geometry, double d, int i) {
        if (!a(geometry)) {
            throw new IllegalArgumentException();
        }
        return new RasterizedGeometry2DImpl(geometry, d, i);
    }

    public static RasterizedGeometry2D create(MultiVertexGeometryImpl multiVertexGeometryImpl, double d, int i) {
        if (!a(multiVertexGeometryImpl)) {
            throw new IllegalArgumentException();
        }
        return new RasterizedGeometry2DImpl(multiVertexGeometryImpl, d, i);
    }

    /* renamed from: com.esri.core.geometry.RasterizedGeometry2D$1  reason: invalid class name */
    /* loaded from: classes.dex */
    static /* synthetic */ class AnonymousClass1 {
        static final /* synthetic */ int[] a;

        static {
            int[] iArr = new int[Geometry.GeometryAccelerationDegree.values().length];
            a = iArr;
            try {
                iArr[Geometry.GeometryAccelerationDegree.enumMild.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                a[Geometry.GeometryAccelerationDegree.enumMedium.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                a[Geometry.GeometryAccelerationDegree.enumHot.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
        }
    }

    public static int rasterSizeFromAccelerationDegree(Geometry.GeometryAccelerationDegree geometryAccelerationDegree) {
        int i = AnonymousClass1.a[geometryAccelerationDegree.ordinal()];
        if (i != 1) {
            if (i != 2) {
                if (i == 3) {
                    return 262144;
                }
                throw new GeometryException("internal error");
            }
            return 16384;
        }
        return 1024;
    }

    static boolean a(Geometry geometry) {
        if (geometry.isEmpty()) {
            return false;
        }
        return geometry.getType() == Geometry.Type.POLYLINE || geometry.getType() == Geometry.Type.POLYGON;
    }
}
